/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.fee.core.domain;

import info.peigen.hotpot.business.account.core.domain.account.Account;
import info.peigen.hotpot.business.fee.facade.enums.FeeAction;
import info.peigen.hotpot.business.fee.facade.enums.FeeProductCode;
import info.peigen.hotpot.common.core.domain.DomainObject;
import info.peigen.hotpot.common.core.lang.money.Money;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

/**
 * <b>(Fee)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/8/26
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class Fee extends DomainObject {
    /** 交易系统订单号 */
    @NotEmpty
    String tradeId;
    /** 算费客户-针对哪个客户计算费用 */
    Account   calculateAccount;
    /** 被计费客户-针对哪个客户计费 */
    Account   billingAccount;
    /** 被收费账户-针对哪个客户收费 */
    Account   chargeAccount;
    /** 当前行为 */
    FeeAction action;
    /** 收费产品码 */
    @NotNull
    FeeProductCode code;
    /** 命中的收费规则 */
    @NotNull
    FeeRule        rule;
    /** 交易金额-包含币种 */
    Money   transAmount;
    /** 总收费金额-包含币种 */
    Money   feeAmount;
    /** 充电收费金额-包含币种 */
    Money   chargeFeeAmount;
    /** 服务收费金额-包含币种 */
    Money   serviceFeeAmount;
    /** 收费账户 */
    Account feeAccount;
    /** 收费记录 */
    FeeLog  feeLog;
    /** memo */
    String  memo;
}